package modelApp

import java.io.Serializable
import java.util.List
import org.apache.wicket.markup.html.panel.FeedbackPanel

abstract class AbstractEditor<T> implements Serializable {
	
	@Property var List<String> errors = newArrayList
	
	def abstract void prepararElemento(T elemento)
	def abstract void save()
	
	def addErrors(List<String> _errors){
		errors.addAll(_errors)
	}
	
	def abstract void validate(FeedbackPanel fbpanel)
	
	def clearErrors(){
		errors.clear
	}
	
}
